package com.ym.medical.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ym.medical.enums.CashFlowEnum;
import com.ym.medical.enums.ConsumeDetailsTdTypeEnum;
import com.ym.medical.enums.InquiryOrderSourceEnum;
import com.ym.medical.enums.PaymentWayEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "医生/患者账户明细")
public class DoctorTdDetailsVO {

	@ApiModelProperty("消费明细主键")
	@NotNull(message = "消费明细主键不能为空!")
	private Long id;

	@ApiModelProperty("账户主键")
	private Long accId;

	@ApiModelProperty("交易单号")
	@Size(max = 32, message = "交易单号长度必须在{min}和{max}之间")
	private String tdNo;

	@ApiModelProperty("订单编号")
	private String tradeNo;


	@ApiModelProperty("交易明细内容")
	@Size(max = 200, message = "交易明细内容长度必须在{min}和{max}之间")
	private String tdBody;

	@ApiModelProperty("交易类型(图文咨询、电话咨询、视频咨询、送心意、充值、体现)")
	@Size(max = 2, message = "交易类型(图文咨询、电话咨询、视频咨询、送心意、充值、体现)长度必须在{min}和{max}之间")
	@JsonSerialize(converter = ConsumeDetailsTdTypeEnum.Covert.class)
	private String tdType;

	@ApiModelProperty("交易金额")
	private BigDecimal tdAmount;

	@ApiModelProperty("交易后账户余额 ")
	private BigDecimal aftTdAmount;

	@ApiModelProperty("交易时间")
	private Date tdTime;

	@ApiModelProperty("工作室id")
	private Long studioId;

	@ApiModelProperty("创建时间")
	private Date createTime;

	@ApiModelProperty("对方账户主键")
	private Long dfAccId;

	@ApiModelProperty("交易类型(图文咨询、电话咨询、视频咨询、送心意、充值、体现) key='InquiryOrderIoTypeEnum'")
	private String tdTypeName;

	@ApiModelProperty("可空，付款方式( 支付宝、微信、银行卡)")
	@JsonSerialize(converter = PaymentWayEnum.Covert.class)
	private String payType;

	@ApiModelProperty("消费明细现金流向")
	@JsonSerialize(converter = CashFlowEnum.Covert.class)
	private String cashFlow;

	@ApiModelProperty("消费明细现金流向 key='ConsumeDetailsCashFlowEnum'")
	private String cashFlowName;

	@ApiModelProperty("支出")
	private String expend;

	@ApiModelProperty("收入")
	private String income;

	@ApiModelProperty("订单来源")
	@JsonSerialize(converter = InquiryOrderSourceEnum.Covert.class)
	private String orderSource;

	@ApiModelProperty("交易用户昵称")
	private String userNickName;

	@ApiModelProperty("支付金额")
	private BigDecimal paymentPrice;

	@ApiModelProperty("工作室名称")
	private String dsName;

	@ApiModelProperty("工作室分成比例")
	private String workProportion;

	@ApiModelProperty("接单医生姓名")
	private String doctorName;
}
